<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE ExistentialQuantification #-}</span><span>
</span><span id="line-2"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Tc.Errors.Hole.FitTypes</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-3"></span><span>  </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier">TypedHole</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier">HoleFit</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier">HoleFitCandidate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-4"></span><span>  </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#CandPlugin"><span class="hs-identifier">CandPlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#FitPlugin"><span class="hs-identifier">FitPlugin</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPlugin"><span class="hs-identifier">HoleFitPlugin</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier">HoleFitPluginR</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>  </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfIsLcl"><span class="hs-identifier">hfIsLcl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier">pprHoleFitCand</span></a></span><span>
</span><span id="line-6"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html"><span class="hs-identifier">GHC.Tc.Types</span></a></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Constraint.html"><span class="hs-identifier">GHC.Tc.Types.Constraint</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html"><span class="hs-identifier">GHC.Hs.Doc</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#"><span class="hs-identifier">Data.Function</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#on"><span class="hs-identifier">on</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">data</span><span> </span><span id="TypedHole"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-var">TypedHole</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="TypedHole"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-var">TypedHole</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="th_relevant_cts"><span class="annot"><span class="annottext">TypedHole -&gt; Cts
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_relevant_cts"><span class="hs-identifier hs-var hs-var">th_relevant_cts</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Constraint.html#Cts"><span class="hs-identifier hs-type">Cts</span></a></span><span>
</span><span id="line-25"></span><span>                           </span><span class="hs-comment">-- ^ Any relevant Cts to the hole</span><span>
</span><span id="line-26"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="th_implics"><span class="annot"><span class="annottext">TypedHole -&gt; [Implication]
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_implics"><span class="hs-identifier hs-var hs-var">th_implics</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Types.Constraint.html#Implication"><span class="hs-identifier hs-type">Implication</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-27"></span><span>                           </span><span class="hs-comment">-- ^ The nested implications of the hole with the</span><span>
</span><span id="line-28"></span><span>                           </span><span class="hs-comment">--   innermost implication first.</span><span>
</span><span id="line-29"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="th_hole"><span class="annot"><span class="annottext">TypedHole -&gt; Maybe Hole
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_hole"><span class="hs-identifier hs-var hs-var">th_hole</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.Constraint.html#Hole"><span class="hs-identifier hs-type">Hole</span></a></span><span>
</span><span id="line-30"></span><span>                           </span><span class="hs-comment">-- ^ The hole itself, if available. Only for debugging.</span><span>
</span><span id="line-31"></span><span>                           </span><span class="hs-special">}</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917355"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-type">TypedHole</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-34"></span><span>  </span><span id="local-6989586621680917341"><span class="annot"><span class="annottext">ppr :: TypedHole -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-type">TypedHole</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">th_relevant_cts :: TypedHole -&gt; Cts
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_relevant_cts"><span class="hs-identifier hs-var">th_relevant_cts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680917339"><span class="annot"><span class="annottext">Cts
</span><a href="#local-6989586621680917339"><span class="hs-identifier hs-var">rels</span></a></span></span><span>
</span><span id="line-35"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">th_implics :: TypedHole -&gt; [Implication]
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_implics"><span class="hs-identifier hs-var">th_implics</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680917338"><span class="annot"><span class="annottext">[Implication]
</span><a href="#local-6989586621680917338"><span class="hs-identifier hs-var">implics</span></a></span></span><span>
</span><span id="line-36"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">th_hole :: TypedHole -&gt; Maybe Hole
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#th_hole"><span class="hs-identifier hs-var">th_hole</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680917337"><span class="annot"><span class="annottext">Maybe Hole
</span><a href="#local-6989586621680917337"><span class="hs-identifier hs-var">hole</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;TypedHole&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-38"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Cts -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Cts
</span><a href="#local-6989586621680917339"><span class="hs-identifier hs-var">rels</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span> </span><span class="annot"><span class="annottext">[Implication] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Implication]
</span><a href="#local-6989586621680917338"><span class="hs-identifier hs-var">implics</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Hole -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Hole
</span><a href="#local-6989586621680917337"><span class="hs-identifier hs-var">hole</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-comment">-- | HoleFitCandidates are passed to hole fit plugins and then</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- checked whether they fit a given typed-hole.</span><span>
</span><span id="line-42"></span><span class="hs-keyword">data</span><span> </span><span id="HoleFitCandidate"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-var">HoleFitCandidate</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="IdHFCand"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#IdHFCand"><span class="hs-identifier hs-var">IdHFCand</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>             </span><span class="hs-comment">-- An id, like locals.</span><span>
</span><span id="line-43"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span id="NameHFCand"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#NameHFCand"><span class="hs-identifier hs-var">NameHFCand</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>         </span><span class="hs-comment">-- A name, like built-in syntax.</span><span>
</span><span id="line-44"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span id="GreHFCand"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#GreHFCand"><span class="hs-identifier hs-var">GreHFCand</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrElt"><span class="hs-identifier hs-type">GlobalRdrElt</span></a></span><span>  </span><span class="hs-comment">-- A global, like imported ids.</span><span>
</span><span id="line-45"></span><span>                      </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680917321"><span id="local-6989586621680917329"><span class="annot"><span class="annottext">HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool
(HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool)
-&gt; (HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool)
-&gt; Eq HoleFitCandidate
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool
$c/= :: HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool
== :: HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool
$c== :: HoleFitCandidate -&gt; HoleFitCandidate -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917317"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-48"></span><span>  </span><span id="local-6989586621680917316"><span class="annot"><span class="annottext">ppr :: HoleFitCandidate -&gt; SDoc
</span><a href="#local-6989586621680917316"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate -&gt; SDoc
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier hs-var">pprHoleFitCand</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier hs-type">pprHoleFitCand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-51"></span><span id="pprHoleFitCand"><span class="annot"><span class="annottext">pprHoleFitCand :: HoleFitCandidate -&gt; SDoc
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier hs-var hs-var">pprHoleFitCand</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#IdHFCand"><span class="hs-identifier hs-type">IdHFCand</span></a></span><span> </span><span id="local-6989586621680917315"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917315"><span class="hs-identifier hs-var">cid</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Id HFC: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917315"><span class="hs-identifier hs-var">cid</span></a></span><span>
</span><span id="line-52"></span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier hs-var">pprHoleFitCand</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#NameHFCand"><span class="hs-identifier hs-type">NameHFCand</span></a></span><span> </span><span id="local-6989586621680917313"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917313"><span class="hs-identifier hs-var">cname</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Name HFC: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917313"><span class="hs-identifier hs-var">cname</span></a></span><span>
</span><span id="line-53"></span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#pprHoleFitCand"><span class="hs-identifier hs-var">pprHoleFitCand</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#GreHFCand"><span class="hs-identifier hs-type">GreHFCand</span></a></span><span> </span><span id="local-6989586621680917312"><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917312"><span class="hs-identifier hs-var">cgre</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Gre HFC: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917312"><span class="hs-identifier hs-var">cgre</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-56"></span><span>  </span><span id="local-6989586621680917307"><span class="annot"><span class="annottext">getName :: HoleFitCandidate -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var hs-var hs-var hs-var">getName</span></a></span></span><span> </span><span id="local-6989586621680917305"><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917305"><span class="hs-identifier hs-var">hfc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917305"><span class="hs-identifier hs-var">hfc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-57"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#IdHFCand"><span class="hs-identifier hs-type">IdHFCand</span></a></span><span> </span><span id="local-6989586621680917304"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917304"><span class="hs-identifier hs-var">cid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917304"><span class="hs-identifier hs-var">cid</span></a></span><span>
</span><span id="line-58"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#NameHFCand"><span class="hs-identifier hs-type">NameHFCand</span></a></span><span> </span><span id="local-6989586621680917302"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917302"><span class="hs-identifier hs-var">cname</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917302"><span class="hs-identifier hs-var">cname</span></a></span><span>
</span><span id="line-59"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#GreHFCand"><span class="hs-identifier hs-type">GreHFCand</span></a></span><span> </span><span id="local-6989586621680917301"><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917301"><span class="hs-identifier hs-var">cgre</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt -&gt; Name
</span><a href="GHC.Types.Name.Reader.html#gre_name"><span class="hs-identifier hs-var hs-var">gre_name</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917301"><span class="hs-identifier hs-var">cgre</span></a></span><span>
</span><span id="line-60"></span><span>  </span><span id="local-6989586621680917294"><span class="annot"><span class="annottext">getOccName :: HoleFitCandidate -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var hs-var hs-var hs-var">getOccName</span></a></span></span><span> </span><span id="local-6989586621680917292"><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917292"><span class="hs-identifier hs-var">hfc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917292"><span class="hs-identifier hs-var">hfc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-61"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#IdHFCand"><span class="hs-identifier hs-type">IdHFCand</span></a></span><span> </span><span id="local-6989586621680917291"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917291"><span class="hs-identifier hs-var">cid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; OccName
forall name. HasOccName name =&gt; name -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#occName"><span class="hs-identifier hs-var">occName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680917291"><span class="hs-identifier hs-var">cid</span></a></span><span>
</span><span id="line-62"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#NameHFCand"><span class="hs-identifier hs-type">NameHFCand</span></a></span><span> </span><span id="local-6989586621680917289"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917289"><span class="hs-identifier hs-var">cname</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall name. HasOccName name =&gt; name -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#occName"><span class="hs-identifier hs-var">occName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680917289"><span class="hs-identifier hs-var">cname</span></a></span><span>
</span><span id="line-63"></span><span>                     </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#GreHFCand"><span class="hs-identifier hs-type">GreHFCand</span></a></span><span> </span><span id="local-6989586621680917288"><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917288"><span class="hs-identifier hs-var">cgre</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall name. HasOccName name =&gt; name -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#occName"><span class="hs-identifier hs-var">occName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GlobalRdrElt -&gt; Name
</span><a href="GHC.Types.Name.Reader.html#gre_name"><span class="hs-identifier hs-var hs-var">gre_name</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917288"><span class="hs-identifier hs-var">cgre</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#HasOccName"><span class="hs-identifier hs-type">HasOccName</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>  </span><span id="local-6989586621680917283"><span class="annot"><span class="annottext">occName :: HoleFitCandidate -&gt; OccName
</span><a href="#local-6989586621680917283"><span class="hs-identifier hs-var hs-var hs-var hs-var">occName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917268"><span id="local-6989586621680917270"><span id="local-6989586621680917272"><span id="local-6989586621680917274"><span id="local-6989586621680917276"><span id="local-6989586621680917278"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>  </span><span id="local-6989586621680917263"><span class="annot"><span class="annottext">compare :: HoleFitCandidate -&gt; HoleFitCandidate -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering)
-&gt; (HoleFitCandidate -&gt; Name)
-&gt; HoleFitCandidate
-&gt; HoleFitCandidate
-&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- | HoleFit is the type we use for valid hole fits. It contains the</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- element that was checked, the Id of that element as found by `tcLookup`,</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- and the refinement level of the fit, which is the number of extra argument</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).</span><span>
</span><span id="line-75"></span><span class="hs-keyword">data</span><span> </span><span id="HoleFit"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-var">HoleFit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-76"></span><span>  </span><span id="HoleFit"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-var">HoleFit</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="hfId"><span class="annot"><span class="annottext">HoleFit -&gt; Id
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfId"><span class="hs-identifier hs-var hs-var">hfId</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>       </span><span class="hs-comment">-- ^ The elements id in the TcM</span><span>
</span><span id="line-77"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfCand"><span class="annot"><span class="annottext">HoleFit -&gt; HoleFitCandidate
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfCand"><span class="hs-identifier hs-var hs-var">hfCand</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span>  </span><span class="hs-comment">-- ^ The candidate that was checked.</span><span>
</span><span id="line-78"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfType"><span class="annot"><span class="annottext">HoleFit -&gt; TcType
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfType"><span class="hs-identifier hs-var hs-var">hfType</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html#TcType"><span class="hs-identifier hs-type">TcType</span></a></span><span> </span><span class="hs-comment">-- ^ The type of the id, possibly zonked.</span><span>
</span><span id="line-79"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfRefLvl"><span class="annot"><span class="annottext">HoleFit -&gt; Int
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfRefLvl"><span class="hs-identifier hs-var hs-var">hfRefLvl</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>  </span><span class="hs-comment">-- ^ The number of holes in this fit.</span><span>
</span><span id="line-80"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfWrap"><span class="annot"><span class="annottext">HoleFit -&gt; [TcType]
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfWrap"><span class="hs-identifier hs-var hs-var">hfWrap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Utils.TcType.html#TcType"><span class="hs-identifier hs-type">TcType</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- ^ The wrapper for the match.</span><span>
</span><span id="line-81"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfMatches"><span class="annot"><span class="annottext">HoleFit -&gt; [TcType]
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfMatches"><span class="hs-identifier hs-var hs-var">hfMatches</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Utils.TcType.html#TcType"><span class="hs-identifier hs-type">TcType</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-82"></span><span>          </span><span class="hs-comment">-- ^ What the refinement variables got matched with, if anything</span><span>
</span><span id="line-83"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="hfDoc"><span class="annot"><span class="annottext">HoleFit -&gt; Maybe HsDocString
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfDoc"><span class="hs-identifier hs-var hs-var">hfDoc</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-84"></span><span>          </span><span class="hs-comment">-- ^ Documentation of this HoleFit, if available.</span><span>
</span><span id="line-85"></span><span>          </span><span class="hs-special">}</span><span>
</span><span id="line-86"></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="RawHoleFit"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-var">RawHoleFit</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-87"></span><span> </span><span class="hs-comment">-- ^ A fit that is just displayed as is. Here so thatHoleFitPlugins</span><span>
</span><span id="line-88"></span><span> </span><span class="hs-comment">--   can inject any fit they want.</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- We define an Eq and Ord instance to be able to build a graph.</span><span>
</span><span id="line-91"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917250"><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-92"></span><span>   </span><span id="local-6989586621680917248"><span class="annot"><span class="annottext">== :: HoleFit -&gt; HoleFit -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">(==)</span></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Id -&gt; Bool) -&gt; (HoleFit -&gt; Id) -&gt; HoleFit -&gt; HoleFit -&gt; Bool
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; Id
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfId"><span class="hs-identifier hs-var hs-var">hfId</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917245"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-95"></span><span>  </span><span id="local-6989586621680917242"><span class="annot"><span class="annottext">ppr :: HoleFit -&gt; SDoc
</span><a href="#local-6989586621680917242"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-type">RawHoleFit</span></a></span><span> </span><span id="local-6989586621680917241"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680917241"><span class="hs-identifier hs-var">sd</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680917241"><span class="hs-identifier hs-var">sd</span></a></span><span>
</span><span id="line-96"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680917240"><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917240"><span class="hs-identifier hs-var">cand</span></a></span></span><span> </span><span id="local-6989586621680917239"><span class="annot"><span class="annottext">TcType
</span><a href="#local-6989586621680917239"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[TcType]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680917238"><span class="annot"><span class="annottext">[TcType]
</span><a href="#local-6989586621680917238"><span class="hs-identifier hs-var">mtchs</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-97"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680917237"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680917235"><span class="hs-identifier hs-var">holes</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;where&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680917237"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcType -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">TcType
</span><a href="#local-6989586621680917239"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680917237"><span class="annot"><span class="annottext">name :: SDoc
</span><a href="#local-6989586621680917237"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; SDoc) -&gt; Name -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFitCandidate
</span><a href="#local-6989586621680917240"><span class="hs-identifier hs-var">cand</span></a></span><span>
</span><span id="line-99"></span><span>          </span><span id="local-6989586621680917235"><span class="annot"><span class="annottext">holes :: SDoc
</span><a href="#local-6989586621680917235"><span class="hs-identifier hs-var hs-var">holes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(TcType -&gt; SDoc) -&gt; [TcType] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; (TcType -&gt; SDoc) -&gt; TcType -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; (TcType -&gt; SDoc) -&gt; TcType -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TcType -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[TcType]
</span><a href="#local-6989586621680917238"><span class="hs-identifier hs-var">mtchs</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- We compare HoleFits by their name instead of their Id, since we don't</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- want our tests to be affected by the non-determinism of `nonDetCmpVar`,</span><span>
</span><span id="line-103"></span><span class="hs-comment">-- which is used to compare Ids. When comparing, we want HoleFits with a lower</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- refinement level to come first.</span><span>
</span><span id="line-105"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680917213"><span id="local-6989586621680917215"><span id="local-6989586621680917217"><span id="local-6989586621680917219"><span id="local-6989586621680917221"><span id="local-6989586621680917223"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621680917212"><span class="annot"><span class="annottext">compare :: HoleFit -&gt; HoleFit -&gt; Ordering
</span><a href="#local-6989586621680917212"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-type">RawHoleFit</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-type">RawHoleFit</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span>
</span><span id="line-107"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-type">RawHoleFit</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-108"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#RawHoleFit"><span class="hs-identifier hs-type">RawHoleFit</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-109"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span id="local-6989586621680917211"><span class="annot"><span class="annottext">a :: HoleFit
</span><a href="#local-6989586621680917211"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680917210"><span class="annot"><span class="annottext">b :: HoleFit
</span><a href="#local-6989586621680917210"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; HoleFit -&gt; Ordering
</span><a href="#local-6989586621680917209"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><a href="#local-6989586621680917211"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><a href="#local-6989586621680917210"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680917209"><span class="annot"><span class="annottext">cmp :: HoleFit -&gt; HoleFit -&gt; Ordering
</span><a href="#local-6989586621680917209"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; Int
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfRefLvl"><span class="hs-identifier hs-var hs-var">hfRefLvl</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><a href="#local-6989586621680917211"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; Int
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfRefLvl"><span class="hs-identifier hs-var hs-var">hfRefLvl</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><a href="#local-6989586621680917210"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-111"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering)
-&gt; (HoleFit -&gt; Name) -&gt; HoleFit -&gt; HoleFit -&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HoleFitCandidate -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">(HoleFitCandidate -&gt; Name)
-&gt; (HoleFit -&gt; HoleFitCandidate) -&gt; HoleFit -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; HoleFitCandidate
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfCand"><span class="hs-identifier hs-var hs-var">hfCand</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>                 </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int -&gt; Ordering)
-&gt; (HoleFit -&gt; Int) -&gt; HoleFit -&gt; HoleFit -&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; Int
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfRefLvl"><span class="hs-identifier hs-var hs-var">hfRefLvl</span></a></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfIsLcl"><span class="hs-identifier hs-type">hfIsLcl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-115"></span><span id="hfIsLcl"><span class="annot"><span class="annottext">hfIsLcl :: HoleFit -&gt; Bool
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfIsLcl"><span class="hs-identifier hs-var hs-var">hfIsLcl</span></a></span></span><span> </span><span id="local-6989586621680917202"><span class="annot"><span class="annottext">hf :: HoleFit
</span><a href="#local-6989586621680917202"><span class="hs-identifier hs-var">hf</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HoleFit -&gt; HoleFitCandidate
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfCand"><span class="hs-identifier hs-var hs-var">hfCand</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><a href="#local-6989586621680917202"><span class="hs-identifier hs-var">hf</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-116"></span><span>                            </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#IdHFCand"><span class="hs-identifier hs-type">IdHFCand</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-117"></span><span>                            </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#NameHFCand"><span class="hs-identifier hs-type">NameHFCand</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-118"></span><span>                            </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#GreHFCand"><span class="hs-identifier hs-type">GreHFCand</span></a></span><span> </span><span id="local-6989586621680917201"><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917201"><span class="hs-identifier hs-var">gre</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt -&gt; Bool
</span><a href="GHC.Types.Name.Reader.html#gre_lcl"><span class="hs-identifier hs-var hs-var">gre_lcl</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621680917201"><span class="hs-identifier hs-var">gre</span></a></span><span>
</span><span id="line-119"></span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfIsLcl"><span class="hs-identifier hs-var">hfIsLcl</span></a></span><span> </span><span class="annot"><span class="annottext">HoleFit
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- | A plugin for modifying the candidate hole fits *before* they're checked.</span><span>
</span><span id="line-123"></span><span class="hs-keyword">type</span><span> </span><span id="CandPlugin"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#CandPlugin"><span class="hs-identifier hs-var">CandPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-type">TypedHole</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitCandidate"><span class="hs-identifier hs-type">HoleFitCandidate</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | A plugin for modifying hole fits  *after* they've been found.</span><span>
</span><span id="line-126"></span><span class="hs-keyword">type</span><span> </span><span id="FitPlugin"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#FitPlugin"><span class="hs-identifier hs-var">FitPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#TypedHole"><span class="hs-identifier hs-type">TypedHole</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFit"><span class="hs-identifier hs-type">HoleFit</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | A HoleFitPlugin is a pair of candidate and fit plugins.</span><span>
</span><span id="line-129"></span><span class="hs-keyword">data</span><span> </span><span id="HoleFitPlugin"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPlugin"><span class="hs-identifier hs-var">HoleFitPlugin</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="HoleFitPlugin"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPlugin"><span class="hs-identifier hs-var">HoleFitPlugin</span></a></span></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="candPlugin"><span class="annot"><span class="annottext">HoleFitPlugin -&gt; CandPlugin
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#candPlugin"><span class="hs-identifier hs-var hs-var">candPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#CandPlugin"><span class="hs-identifier hs-type">CandPlugin</span></a></span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="fitPlugin"><span class="annot"><span class="annottext">HoleFitPlugin -&gt; FitPlugin
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#fitPlugin"><span class="hs-identifier hs-var hs-var">fitPlugin</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#FitPlugin"><span class="hs-identifier hs-type">FitPlugin</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- | HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can</span><span>
</span><span id="line-134"></span><span class="hs-comment">-- track internal state. Note the existential quantification, ensuring that</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- the state cannot be modified from outside the plugin.</span><span>
</span><span id="line-136"></span><span class="hs-keyword">data</span><span> </span><span id="HoleFitPluginR"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier hs-var">HoleFitPluginR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680917195"><span class="annot"><a href="#local-6989586621680917195"><span class="hs-identifier hs-type">s</span></a></span></span><span class="hs-operator">.</span><span> </span><span id="HoleFitPluginR"><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPluginR"><span class="hs-identifier hs-var">HoleFitPluginR</span></a></span></span><span>
</span><span id="line-137"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="hfPluginInit"><span class="annot"><span class="annottext">()
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfPluginInit"><span class="hs-identifier hs-var hs-var">hfPluginInit</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Types.html#TcRef"><span class="hs-identifier hs-type">TcRef</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680917195"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-comment">-- ^ Initializes the TcRef to be passed to the plugin</span><span>
</span><span id="line-139"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="hfPluginRun"><span class="annot"><span class="annottext">()
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfPluginRun"><span class="hs-identifier hs-var hs-var">hfPluginRun</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRef"><span class="hs-identifier hs-type">TcRef</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680917195"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Errors.Hole.FitTypes.html#HoleFitPlugin"><span class="hs-identifier hs-type">HoleFitPlugin</span></a></span><span>
</span><span id="line-140"></span><span>    </span><span class="hs-comment">-- ^ The function defining the plugin itself</span><span>
</span><span id="line-141"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="hfPluginStop"><span class="annot"><span class="annottext">()
</span><a href="GHC.Tc.Errors.Hole.FitTypes.html#hfPluginStop"><span class="hs-identifier hs-var hs-var">hfPluginStop</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRef"><span class="hs-identifier hs-type">TcRef</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680917195"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-comment">-- ^ Cleanup of state, guaranteed to be called even on error</span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-144"></span></pre></body></html>